# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-aiostream
_pyname=aiostream
pkgver=0.5.2
pkgrel=1
pkgdesc="Generator-based operators for asynchronous iteration"
url="https://github.com/vxgmichel/aiostream"
arch="noarch"
license="GPL-3.0-only"
depends="python3 py3-typing-extensions"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-asyncio py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/vxgmichel/aiostream/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --system-site-packages testenv
	testenv/bin/python3 -m installer dist/*.whl
	testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/*.whl
}
sha512sums="
282139cda0f7d08dd11af88bc3a568054906c2e0e2708f72e0ce3a67d13a44822612e3989c398ab346f8c043f17ad2e5cd2f958b1461325ad9768affec8f63fc  aiostream-0.5.2.tar.gz
"
